/// 轮播图消息表
class CarouselChartEntity {
  /// 主键id
  final int? id;
  /// 图片访问地址
  final String? chartUrl;
  /// 图片跳转地址
  final String? redirectUrl;
  /// 数据状态（1-有效，0-无效）
  final int? status;

  CarouselChartEntity({
    this.id,
    this.chartUrl,
    this.redirectUrl,
    this.status,
  });

  Map<String, dynamic> toJson() {
    final Map<String, dynamic> data = <String, dynamic>{};
    if (id != null) data['id'] = id;
    if (chartUrl != null) data['chartUrl'] = chartUrl;
    if (redirectUrl != null) data['redirectUrl'] = redirectUrl;
    if (status != null) data['status'] = status;
    return data;
  }

  factory CarouselChartEntity.fromJson(Map<String, dynamic> json) {
    return CarouselChartEntity(
      id: json['id'],
      chartUrl: json['chartUrl'],
      redirectUrl: json['redirectUrl'],
      status: json['status'],
    );
  }
}